rendernode: Limit diff region
authorBenjamin Otte <otte@redhat.com>
Mon, 20 Dec 2021 17:40:02 +0000 (18:40 +0100)
committerBenjamin Otte <otte@redhat.com>
Mon, 20 Dec 2021 17:40:02 +0000 (18:40 +0100)
commit20dcc31d19fcb544b4d830c2c99ced6828888a86
tree4cee4458c57318bdbbfb064775f3d2f0cb74cb56
parent4e6ee28bcb18c027b2857abca4ab48708a5739ad
rendernode: Limit diff region

Limit the diff region to 30 rectangles (randomly chosen because it
looked big enough to not trigger by accident and small enough to not
cause performance issues).

If the diff region gets more complicated, we abort to the parent node
and use its bounds as the diff region instead and then continue diffing
the rest of the node tree.

Fixes: #4560
Fixes: #2396
gsk/gskrendernodeimpl.c